<ul> <?php $params = $this->request->params; ?>
  <li><?php echo $this->Html->link('HOME', '/weddings-in-trinidad-and-tobago', array('class'=> ($params['controller'] ==='contents' && $params['action']==='home') ? "selected" : "")) ?></li>
  <li><?php echo $this->Html->link('ABOUT US', '/about-us', array('class'=> ($params['controller'] ==='contents' && $params['action']==='about_us') ? "selected" : "")) ?>
 <?php /*
   <table>
      <tbody>
      <tr>
        <td width="33%"><a href="#">Link 1</a></td>
        <td width="33%"><a href="#">Link 2</a></td>
        <td width="33%"><a href="#">Link 3</a></td>
      </tr>
       <tr>
        <td><a href="#">Link 4</a></td>
        <td><a href="#">Link 5</a></td>
        <td><a href="#">Link 6</a></td>
      </tr>
       <tr>
        <td><a href="#">Link 7</a></td>
        <td><a href="#">&nbsp;</a></td>
        <td><a href="#">&nbsp;</a></td>
      </tr>
      </tbody>
    </table>
*/ ?>
  </li>
  <li><?php echo $this->Html->link('ADVICE', '/caribbean-wedding-information', array('class'=> ($params['controller'] ==='articles' && $params['action']==='index') ? "selected" : "")) ?></li>
  <li><?php echo $this->Html->link('GALLERY', '/gallery', array('class'=> ($params['controller'] ==='categories' || $params['controller']==='albums') ? "selected" : "")) ?></li>
  <li><?php echo $this->Html->link('SERVICES', '/services', array('class'=> (in_array($params['controller'],array('services','companies','ads')))? "selected" : "")) ?>
    <?php
    $services = $this->Session->read('Services');
    if(empty($services)) {
      $services = $this->requestAction(array('controller'=>'services', 'action'=>'menu'));
    }
    if (!empty ($services)) {
      if(sizeof($services)<=6) {
        echo '<ul>';
        foreach ($services as $service ) { //TODO - Logic in here for tabular format
         echo '<li>'.$this->Html->link($service['Service']['name'], array('controller'=>'companies', 'action'=>'company_service',$service['Service']['id'])).'</li>';
        }
        echo '</ul>';
      } else { ?>
        <table id="tableNav">
          <tbody>            
         <?php $count=0; for ($i=0; $i<sizeof($services); $i=$i+3 ) {  ?>   
          <tr>
            <td width="33%"><?php if(!empty($services[$i])) {echo $this->Html->link($services[$i]['Service']['name'], array('controller'=>'companies', 'action'=>'company_service',$services[$i]['Service']['id']));} else {echo '&nbsp;';}?></td>
            <td width="33%"><?php if(!empty($services[$i+1])) {echo $this->Html->link($services[$i+1]['Service']['name'], array('controller'=>'companies', 'action'=>'company_service',$services[$i+1]['Service']['id']));} else {echo '&nbsp;';}?></td>
            <td width="33%"><?php if(!empty($services[$i+2])) {echo $this->Html->link($services[$i+2]['Service']['name'], array('controller'=>'companies', 'action'=>'company_service',$services[$i+2]['Service']['id']));} else {echo '&nbsp;';}?></td>
          </tr>
          <?php $count++; } ?>
          </tbody>
        </table>
      <?php
      }
      ?>

    <?php } ?>
  </li>
 <?php /* <li><?php echo $this->Html->link('CATALOG', '/catalog', array('class'=>  ($params['controller'] ==='contents' && $params['action']==='catalog') ? "selected" : "")) ?></li> */?>
    <li><?php echo $this->Html->link('CONCIERGE', '/concierge_services', array('class'=> ($params['controller'] ==='contents' && $params['action']==='concierge_services') ? "selected" : "")) ?></li>
  <li><?php echo $this->Html->link('CONTACT', '/contact', array('class'=>  ($params['controller'] ==='contact' && $params['action']==='index') ? "selected" : "")) ?></li>
</ul>
